<?php

App::uses('AppHelper', 'View/Helper');

/**
 * Application helper
 *
 * Add your application-wide methods in the class below, your helpers
 * will inherit them.
 *
 * @package       app.View.Helper
 */
class VariantsHelper extends AppHelper {
	public $helpers = array('Html');

	public function getMasterVariant($productId){
		$variant = new Variant();
		$variant = $variant->find('first', array('conditions' => array('product_id' => $productId,
																																		'is_master' => true)));
		return $variant;
	}

}
